#ifndef __MYSQL_OP_H__
#define __MYSQL_OP_H__

#include "/usr/include/mysql/mysql.h"
#include "head.h"

#define OPEN_MYSQL(myconnect) \
do{\
    MYSQL myconnect;\
    mysql_init(&myconnect);\
    if(mysql_real_connect(&myconnect,"127.0.0.1","root","1234","yourdb",0,NULL,CLIENT_FOUND_ROWS))\
    { \
        printf("数据库连接成功\n")


#define CLOSE_MYSQL(myconnect) \
        mysql_close(&myconnect);\
        printf("数据库连接关闭\n");\
    }\
}while(0)


int getUsrId(char *username);
void InsertVirtualFile(char* filename,int owner_id,char* md5,int filesize,int type);
#endif